package com.mdd.front.validate.order;

import com.mdd.common.validator.annotation.IDMust;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 订单中所包含的商品参数
 * @author LikeAdmin
 */
@Data
@ApiModel("订单中所包含的商品更新参数")
public class OrderItemUpdateValidate implements Serializable {

    private static final long serialVersionUID = 1L;

    @IDMust(message = "id参数必传且需大于0")
    @ApiModelProperty(value = "")
    private Long id;

    @NotNull(message = "orderId参数缺失")
    @ApiModelProperty(value = "订单id")
    private Long orderId;

    @NotNull(message = "orderSn参数缺失")
    @ApiModelProperty(value = "订单编号")
    private String orderSn;

    @NotNull(message = "productId参数缺失")
    @ApiModelProperty(value = "商品编号")
    private Long productId;

    @NotNull(message = "productPic参数缺失")
    @ApiModelProperty(value = "商品封面图")
    private String productPic;

    @NotNull(message = "productName参数缺失")
    @ApiModelProperty(value = "商品名称")
    private String productName;

    @NotNull(message = "productBrand参数缺失")
    @ApiModelProperty(value = "商品品牌")
    private String productBrand;

    @NotNull(message = "productSn参数缺失")
    @ApiModelProperty(value = "商品编码")
    private String productSn;

    @NotNull(message = "productPrice参数缺失")
    @ApiModelProperty(value = "销售价格")
    private BigDecimal productPrice;

    @NotNull(message = "productQuantity参数缺失")
    @ApiModelProperty(value = "购买数量")
    private Long productQuantity;

    @NotNull(message = "productSkuId参数缺失")
    @ApiModelProperty(value = "商品sku编号")
    private Long productSkuId;

    @NotNull(message = "productSkuCode参数缺失")
    @ApiModelProperty(value = "商品sku条码")
    private String productSkuCode;

    @NotNull(message = "productCategoryId参数缺失")
    @ApiModelProperty(value = "商品分类id")
    private Long productCategoryId;

    @NotNull(message = "promotionName参数缺失")
    @ApiModelProperty(value = "商品促销名称")
    private String promotionName;

    @NotNull(message = "promotionAmount参数缺失")
    @ApiModelProperty(value = "商品促销分解金额")
    private BigDecimal promotionAmount;

    @NotNull(message = "couponAmount参数缺失")
    @ApiModelProperty(value = "优惠券优惠分解金额")
    private BigDecimal couponAmount;

    @NotNull(message = "integrationAmount参数缺失")
    @ApiModelProperty(value = "积分优惠分解金额")
    private BigDecimal integrationAmount;

    @NotNull(message = "realAmount参数缺失")
    @ApiModelProperty(value = "该商品经过优惠后的分解金额")
    private BigDecimal realAmount;

    @NotNull(message = "giftIntegration参数缺失")
    @ApiModelProperty(value = "")
    private Long giftIntegration;

    @NotNull(message = "giftGrowth参数缺失")
    @ApiModelProperty(value = "")
    private Long giftGrowth;

    @NotNull(message = "productAttr参数缺失")
    @ApiModelProperty(value = "商品销售属性:[{},{}]")
    private String productAttr;

}
